import request from "@/api/request"

export const getAllExam=(data)=>{
    return request({
        url:`/exam/${data.pageNum}/${data.pageSize}`,
    })
}
export const getExamById=(id)=>{
    return request({
        url:`/exam/order/${id}`,
    })
}
export const getOneExamById=(id)=>{
    return request({
        url:`/exam/${id}`,
    })
}
export const getExam1234=({subject,pageNum,pageSize})=>{
    return request({
        url:`/exam/subject/${subject}/${pageNum}/${pageSize}`,
    })
}
export const getExamByplace=({pageNum,pageSize,place})=>{
    return request({
        url:`/exam/place/${pageNum}/${pageSize}/${place}`,
    })
}
export const getExamByLoginId=({pageNum,pageSize,id,date})=>{
    return request({
        url:`/exam/id/${pageNum}/${pageSize}/${id}/${date}`,
    })
}
export const UpdateExam=(data)=>{
    return request({
        url:'/exam',
        method:'PUT',
        data
    })
}
export const InsertExam=(data)=>{
    return request({
        url:'/exam',
        method:'POST',
        data
    })
}
export const deleteExamById=(id)=>{
    return request({
        url:`/exam/${id}`,
        method:'DELETE',
    })
}